﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

#if SILVERLIGHT
using System.Windows.Media;
using GameEngineSL.SilverlightCompatibility;
#else
using System.Drawing;
using System.Windows.Forms;
#endif

using GameEngine.Worlds;

namespace GameEngine.Interactors
{
    public class BattleMapInteractor : BaseInteractor, IPointerInteractor
    {

        /// <summary>
        /// BaseInteractor constructor
        /// </summary>
        /// <param name="world">
        /// World to operate on.</param>
        public BattleMapInteractor(World world) : base(world)
        {
        }

        #region ITick Members

        /// <summary>
        /// The left mouse button has been clicked.
        /// </summary>
        /// <param name="position">
        /// Current position of the pointer.</param>
        /// <param name="button">
        /// Mouse Button which went down.</param>
        new public void OnMouseDown(PointF position, MouseButtons button)
        {
        }

        /// <summary>
        /// The pointer is moved (mouse move).
        /// </summary>
        /// <param name="position">
        /// Current position of the  pointer.</param>
        new public void OnMouseMove(PointF position)
        {
            foreach (Unit unit in world.Units)
            {
                unit.Walker.Destination = position;
            }
        }

        /// <summary>
        /// The pointer is deactivated (mouse up).
        /// </summary>
        /// <param name="position">
        /// Current position of the pointer.</param>
        /// <param name="button">
        /// Mouse Button which went up.</param>
        new public void OnMouseUp(PointF position, MouseButtons button)
        {
        }

        #endregion
    }
}
